﻿<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>顶部</title>
    <link rel="stylesheet" type="text/css" href="/css/public.css">
</head>

<body>
    <div id="header">
        <img src="/images/logo1.png" />
        <h3>欢迎{{admin_name}}登陆</h3>
        <a href="javascript:;" onclick="logout()">退出</a>
    </div>
    <script src="/libs/jquery.js"></script>
    <script>
       //退出登录
       function  logout(){
            $.get('/admin/logout',function(res){
                if(res.status==200){
                    alert('退出成功')
                    //把整个后台页面退出，而不是退出头部部分
                    top.location.href='/admin/login'
                }  
            })
       }
    </script>

</body>

</html>